package com.jdd.modules.deviceLog.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jdd.common.aspect.annotation.Dict;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author ls
 * @since 2022-10-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TUserCmdLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String id;

    @TableField(exist = false)
    private String userName;

    /**
     * 人员id
     */
    private String userId;

    /**
     * 操作类型,0:新增，1：编辑，2：删除
     */
    @Dict(dicCode = "option_type")
    private Integer optionType;

    /**
     * 操作状态，0：带生效,1：成功，2：失败
     */
    @Dict(dicCode = "option_status")
    private Integer optionStatus;

    /**
     * 设备请求指令id
     */

    private String optionCmdRequestId;

    /**
     * 设备请求回复id
     */
    private String optionCmdResponseId;

    /**
     * 设备序列号
     */
    private String deviceSn;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField(exist = false)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date opTime_begin;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date opTime_end;
    /**
     * 错误信息
     */
    private String errorInfo;
}
